package com.yanqu.road.entity.activity.xiuxian.config;

import com.yanqu.road.entity.activity.ActivityConfig;
import com.yanqu.road.entity.activity.ActivityInfo;
import com.yanqu.road.entity.enums.eActivityConfigType;
import com.yanqu.road.utils.date.DateHelper;
import com.yanqu.road.utils.string.StringUtils;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

/**
 * 凡人修仙配置
 */
public class XiuXianConfig {

    private ActivityInfo activityInfo;

    private int XIUXIAN_PERSONAL_SCORE_ID;                      // 个人战绩ID
    private int XIUXIAN_SECT_SCORE_ID;                          // 宗门积分ID
    private int XIUXIAN_PVP_IS_OPEN;                            // PVP是否开启（1是，0否)
    private int XIUXIAN_PVP_JOIN_CONDITION;                     // PVP参加条件（仙力达到本宗门前xx名
    private String XIUXIAN_PVP_PREPARE_TIME;                    // PVP准备期（开始时间|持续时间/S)
    private String XIUXIAN_PVP_BATTLE_TIME_END_CONDITION;       // PVP斗法期结束条件（持续时间/S|占领积分)
    private String XIUXIAN_PVP_PROFILE_RADIUS;                  // PVP玩家头像半径（仙力≥配置值1；半径1|仙力≥配置值2；半径2）
    private int XIUXIAN_PVP_MOVE_SPEED;                         // PVP玩家移动速度
    private int XIUXIAN_PVP_DELIVERY_CD;                        // PVP传送CD/S
    private int XIUXIAN_PVP_ATTACK_DISTANCE;                    // PVP玩家攻击距离
    private String XIUXIAN_PVP_RESURRECTION_CD;                 // PVP宝地玩家复活cd/S  MAX(基础cd+cd递增值，最大cd）  配置：基础cd|递增cd|最大cd
    private int XIUXIAN_PVP_SIGN_CD;                            // PVP宝地 宗主、副宗主标记宝地cd/S
    private int XIUXIAN_PVP_SEIZE_COUNT_TIME;                   // PVP宝地 抢占倒计时/S
    private String XIUXIAN_PVP_PERSONAL_SCORE_KILL;             // PVP玩家击杀战绩（被击杀者仙力≥配置值1；战绩1|被击杀者仙力≥配置值2；战绩2）
    private String XIUXIAN_PVP_PERSONAL_SCORE_SEIZE;               // PVP宝地 抢占所获得的个人战绩
    private int XIUXIAN_PVP_APPOINTMENT_CD;                     // PVP宗主任命副宗主的冷却时间/S
    private int XIUXIAN_PVP_NOTICE_NUM;                         // PVP公告 数量
    private String XIUXIAN_PVP_NOTICE_SINGLE_TIME_KILL_NUM;     // PVP公告 1条命击杀玩家人数≥xx，配置（是否推送|xx）1推送0不推
    private String XIUXIAN_PVP_NOTICE_SINGLE_WHEEL_KILL_NUM;    // PVP公告 1轮内击杀玩家人数≥xx，配置（是否推送|xx）
    private String XIUXIAN_PVP_NOTICE_SINGLE_WHEEL_SEIZE_NUM;   // PVP公告 1轮内抢占宝地次数≥xx，配置（是否推送|xx）
    private String XIUXIAN_PVP_NOTICE_PERSONAL_SCORE;           // PVP公告 个人战绩≥xx，配置（是否推送|xx）
    private String XIUXIAN_PVP_NOTICE_SINGLE_PERSONAL_SCORE;    // PVP公告 个人单次战绩≥xx，配置（是否推送|xx）
    private String XIUXIAN_PVP_NOTICE_PLACE_LEVEL;              // PVP公告 xx级宝地被抢占，配置（是否推送|xx）
    private String XIUXIAN_PVP_NOTICE_PLACE_LEVEL_TIME;         // PVP公告 xx级宝地被抢占xxx秒，配置（是否推送|xx|xxx）
    private String XIUXIAN_PVP_NOTICE_APPOINTMENT;              // PVP公告 宗门任命副宗主，配置（是否推送）
    private String XIUXIAN_PVP_NOTICE_APPOINTMENT_RECOVERY;     // PVP公告 宗门收回副宗主权限，配置（是否推送）
    private String XIUXIAN_PVP_NOTICE_SIGN;                     // PVP公告 宗主、副宗主标记地点，配置（是否推送|xx）
    private String XIUXIAN_PVP_NOTICE_PLACE_CHANGED_HANDS;      // PVP公告 本宗门宝地易手，配置（是否推送|xx）
    private String XIUXIAN_PVP_NOTICE_BATTLE_END_TIME;          // PVP公告 斗法期结束剩余时间（剩余时间/S（5.5新增）
    private String XIUXIAN_PVP_NOTICE_BATTLE_END_TIME_SECT_SCORE; // PVP公告 斗法期结束某宗门上限分差值（5.5新增）
    private String XIUXIAN_SECT_SCORE_PRM;                      // 宗门评分参数（a赚钱值=aa评分| b 人民币=bb评分）
    private int XIUXIAN_SECT_JUDGE_PRM;                         // 宗门分组判断差值
    private int XIUXIAN_PVP_ROOM_PEOPLE_NUM_MAX;                // PVP 单房间人数上限
    private int XIUXIAN_PVP_ATTACK_SPEED_RATIO;                 // PVP 攻速比例千分比（性能）
    private String XIUXIAN_SECT_SCORE_DEFAULT;                  // 宗门默认评分|默认评分判断时间/S
    private int XIUXIAN_TRIPOD_EXP_ID;           // 虚天鼎经验道具ID
    private int XIUXIAN_PRACTICE_SCORE_ID;       // 境界突破或渡劫道具--修为
    private int XIUXIAN_XIANLI_SCORE_ID;         // 境界突破或渡劫道具--仙力
    private int XIUXIAN_STATE_UPGRADE_FAIL_CD;   // 渡劫失败CD/S
    private int XIUXIAN_ENERGY_CD;              // 体力CD时间/S
    private int XIUXIAN_ENERGY_CD_NUM;          // 体力CD恢复值
    private int XIUXIAN_ENERGY_LIMIT;           // 体力上限值
    private int XIUXIAN_ENERGY_INIT;            // 体力初始值
    private int XIUXIAN_ENERGY_RECOVERY_ITEM_ID;          // 体力恢复道具ID--天地灵液
    private int XIUXIAN_ENERGY_COST;                // 每次修炼消耗的体力数量
    private int XIUXIAN_PLAYER_SKILL_NEED_ANGER;    // 玩家技能释放所需怒气值
    private String XIUXIAN_ENERGY_OBTAIN1;          // 每次修炼获得的机缘点(机缘点数量；权重)
    private int XIUXIAN_EXTRACT_COST;               // 每次抽取法宝消耗的机缘点
    private int XIUXIAN_ATTRIBUTE_VERTIGO_TIME;     // 眩晕时间/毫秒
    private int XIUXIAN_ENERGY_OBTAIN2;             // 每次修炼获得的修为
    private int XIUXIAN_PEAK_ASSIGN_CD;             // 灵峰分配CD/S
    private int XIUXIAN_EQUIPMENT_RARE;             // 珍稀法宝判断依据
    private int XIUXIAN_BASE_ATTACK_SPEED;          // 玩家基础攻速/MS
    private int XIUXIAN_STATE_UPGRADE_FAIL_CONSUME;  // 渡劫失败扣除修为%（千分比
    private int XIUXIAN_STATE_PRODUCTION_XIUWEI_CD;  // 境界产出修为CD/S
    private int XIUXIAN_BATTLE_TIME;                 // 战斗时长/MS
    private int XIUXIAN_PLAYER_SKILL_MAX_ANGER;      // 玩家主动法宝技能怒气上限值
    private int XIUXIAN_ENERGY_NOTICE_NUM;           // 体力榜单公告数量
    private int XIUXIAN_PRACTICE_MENU_NUM;           // 历练界面展示玩家数量上限
    private int XIUXIAN_PLAYER_SKILL_DAMAGE_PRM;     // 玩家主动法宝技能参数千分比
    private String XIUXIAN_ATTRIBUTE_VALUE_MAX;     // 玩家属性最大值限制
    private String XIUXIAN_INIT_EQUIPMENT;          // 玩家初始装备ID|初始装备等级
    private String XIUXIAN_PLAYER_ANGER_PRM;          // 玩家怒气值(参数1=自动回复时间/MS，参数2=自动回复怒气值，参数3=每次攻击回复怒气值
    private String XIUXIAN_STATE_UPGRADE_FAIL_PRM;  // 渡劫公式  MIN（参数1/1000*（玩家仙力/标准仙力*参数2）^2 + 参数3，参数4）/100
    private String XIUXIAN_XIANLI_PRM;              // 仙力计算系数（X1|X2|X3|X4|X5|X6|X7）
    private int XIUXIAN_JIYUANDIAN_ITEM_ID = 123142;    // 机缘点道具id（获得时转换成机缘点，id写死，数值说不会改）
    private int XIUXIAN_XUTIANYUANLING_ITEM_ID = 101842;    // 虚天元灵道具id（积分道具，id写死，数值说不会改）
    private int XIUXIAN_MAX_SHANBI_SHANGXIAN = 800;    //玩家最终闪避上限千分比，已计算对方的命中
    private int XIUXIAN_HP_CAP_PARM = 10000;    //境界系数，血量=配置攻击*此系数/1000
    private String XIUXIAN_QUALITY_REGULAR_NUM;     // 保底品质设定，第n次必定获得某品质的法宝：10;5|50;5 (5.4新增)
    private String XIUXIAN_FABAO_ID_REGULAR_NUM;     // 保底id设定，第n次必定活动某id的法宝，若与保底品质设定冲突则优先保底ID

    private Map<Long,Integer> qualityRegularMap = new ConcurrentHashMap<>();
    private Map<Long,Integer> fabaoIdRegularMap = new ConcurrentHashMap<>();

    private Map<Integer, XiuXianPvpPlaceConfig> placeConfigMap = new ConcurrentHashMap<>();
    private Map<Integer, XiuXianStateConfig> stateConfigMap = new ConcurrentHashMap<>();
    private Map<Integer, XiuXianTripodConfig> tripodConfigMap = new ConcurrentHashMap<>();
    private Map<Integer, XiuXianEquipmentConfig> equipmentConfigMap = new ConcurrentHashMap<>();
    private Map<Integer, XiuXianEventConfig> eventConfigMap = new ConcurrentHashMap<>();
    private Map<Integer, XiuXianNpcConfig> npcConfigMap = new ConcurrentHashMap<>();
    private Map<Integer, XiuXianMissionConfig> missionConfigMap = new ConcurrentHashMap<>();
    private Map<Integer, Map<Integer, XiuXianUpgradeConfig>> upgradeConfigMap = new ConcurrentHashMap<>();
    private Map<Integer, XiuXianPeakConfig> peakConfigMap = new ConcurrentHashMap<>();


    /**
     * 初始化相关配置
     * @param activityConfigMap 活动配置map
     */
    public void initConfig(Map<String, ActivityConfig> activityConfigMap) {
        // pve
        XIUXIAN_TRIPOD_EXP_ID = activityConfigMap.get(eActivityConfigType.XIUXIAN_TRIPOD_EXP_ID.getName()).getIntValue();
        XIUXIAN_PRACTICE_SCORE_ID = activityConfigMap.get(eActivityConfigType.XIUXIAN_PRACTICE_SCORE_ID.getName()).getIntValue();
        XIUXIAN_XIANLI_SCORE_ID = activityConfigMap.get(eActivityConfigType.XIUXIAN_XIANLI_SCORE_ID.getName()).getIntValue();
        XIUXIAN_STATE_UPGRADE_FAIL_CD = activityConfigMap.get(eActivityConfigType.XIUXIAN_STATE_UPGRADE_FAIL_CD.getName()).getIntValue();
        XIUXIAN_ENERGY_CD = activityConfigMap.get(eActivityConfigType.XIUXIAN_ENERGY_CD.getName()).getIntValue();
        XIUXIAN_ENERGY_CD_NUM = activityConfigMap.get(eActivityConfigType.XIUXIAN_ENERGY_CD_NUM.getName()).getIntValue();
        XIUXIAN_ENERGY_LIMIT = activityConfigMap.get(eActivityConfigType.XIUXIAN_ENERGY_LIMIT.getName()).getIntValue();
        XIUXIAN_ENERGY_INIT = activityConfigMap.get(eActivityConfigType.XIUXIAN_ENERGY_INIT.getName()).getIntValue();
        XIUXIAN_ENERGY_RECOVERY_ITEM_ID = activityConfigMap.get(eActivityConfigType.XIUXIAN_ENERGY_RECOVERY_ITEM_ID.getName()).getIntValue();
        XIUXIAN_ENERGY_COST = activityConfigMap.get(eActivityConfigType.XIUXIAN_ENERGY_COST.getName()).getIntValue();
        XIUXIAN_PLAYER_SKILL_NEED_ANGER = activityConfigMap.get(eActivityConfigType.XIUXIAN_PLAYER_SKILL_NEED_ANGER.getName()).getIntValue();
        XIUXIAN_ENERGY_OBTAIN1 = activityConfigMap.get(eActivityConfigType.XIUXIAN_ENERGY_OBTAIN1.getName()).getValue();
        XIUXIAN_ENERGY_OBTAIN2 = activityConfigMap.get(eActivityConfigType.XIUXIAN_ENERGY_OBTAIN2.getName()).getIntValue();
        XIUXIAN_PEAK_ASSIGN_CD = activityConfigMap.get(eActivityConfigType.XIUXIAN_PEAK_ASSIGN_CD.getName()).getIntValue();
        XIUXIAN_EXTRACT_COST = activityConfigMap.get(eActivityConfigType.XIUXIAN_EXTRACT_COST.getName()).getIntValue();
        XIUXIAN_ATTRIBUTE_VERTIGO_TIME = activityConfigMap.get(eActivityConfigType.XIUXIAN_ATTRIBUTE_VERTIGO_TIME.getName()).getIntValue();
        XIUXIAN_EQUIPMENT_RARE = activityConfigMap.get(eActivityConfigType.XIUXIAN_EQUIPMENT_RARE.getName()).getIntValue();
        XIUXIAN_STATE_UPGRADE_FAIL_PRM = activityConfigMap.get(eActivityConfigType.XIUXIAN_STATE_UPGRADE_FAIL_PRM.getName()).getValue();
        XIUXIAN_PLAYER_ANGER_PRM = activityConfigMap.get(eActivityConfigType.XIUXIAN_PLAYER_ANGER_PRM.getName()).getValue();
        XIUXIAN_XIANLI_PRM = activityConfigMap.get(eActivityConfigType.XIUXIAN_XIANLI_PRM.getName()).getValue();
        XIUXIAN_STATE_UPGRADE_FAIL_CONSUME = activityConfigMap.get(eActivityConfigType.XIUXIAN_STATE_UPGRADE_FAIL_CONSUME.getName()).getIntValue();
        XIUXIAN_STATE_PRODUCTION_XIUWEI_CD = activityConfigMap.get(eActivityConfigType.XIUXIAN_STATE_PRODUCTION_XIUWEI_CD.getName()).getIntValue();
        XIUXIAN_BATTLE_TIME = activityConfigMap.get(eActivityConfigType.XIUXIAN_BATTLE_TIME.getName()).getIntValue();
        XIUXIAN_PLAYER_SKILL_MAX_ANGER = activityConfigMap.get(eActivityConfigType.XIUXIAN_PLAYER_SKILL_MAX_ANGER.getName()).getIntValue();
        XIUXIAN_ENERGY_NOTICE_NUM = activityConfigMap.get(eActivityConfigType.XIUXIAN_ENERGY_NOTICE_NUM.getName()).getIntValue();
        XIUXIAN_PLAYER_SKILL_DAMAGE_PRM = activityConfigMap.get(eActivityConfigType.XIUXIAN_PLAYER_SKILL_DAMAGE_PRM.getName()).getIntValue();
        XIUXIAN_INIT_EQUIPMENT = activityConfigMap.get(eActivityConfigType.XIUXIAN_INIT_EQUIPMENT.getName()).getValue();
        XIUXIAN_PRACTICE_MENU_NUM = activityConfigMap.get(eActivityConfigType.XIUXIAN_PRACTICE_MENU_NUM.getName()).getIntValue();

        // pvp
        XIUXIAN_PERSONAL_SCORE_ID = activityConfigMap.get(eActivityConfigType.XIUXIAN_PERSONAL_SCORE_ID.getName()).getIntValue();
        XIUXIAN_SECT_SCORE_ID = activityConfigMap.get(eActivityConfigType.XIUXIAN_SECT_SCORE_ID.getName()).getIntValue();
        XIUXIAN_PVP_IS_OPEN = activityConfigMap.get(eActivityConfigType.XIUXIAN_PVP_IS_OPEN.getName()).getIntValue();
        XIUXIAN_PVP_JOIN_CONDITION = activityConfigMap.get(eActivityConfigType.XIUXIAN_PVP_JOIN_CONDITION.getName()).getIntValue();
        XIUXIAN_PVP_PREPARE_TIME = activityConfigMap.get(eActivityConfigType.XIUXIAN_PVP_PREPARE_TIME.getName()).getValue();
        XIUXIAN_PVP_BATTLE_TIME_END_CONDITION = activityConfigMap.get(eActivityConfigType.XIUXIAN_PVP_BATTLE_TIME_END_CONDITION.getName()).getValue();
        XIUXIAN_PVP_PROFILE_RADIUS = activityConfigMap.get(eActivityConfigType.XIUXIAN_PVP_PROFILE_RADIUS.getName()).getValue();
        XIUXIAN_PVP_MOVE_SPEED = activityConfigMap.get(eActivityConfigType.XIUXIAN_PVP_MOVE_SPEED.getName()).getIntValue();
        XIUXIAN_PVP_DELIVERY_CD = activityConfigMap.get(eActivityConfigType.XIUXIAN_PVP_DELIVERY_CD.getName()).getIntValue();
        XIUXIAN_PVP_ATTACK_DISTANCE = activityConfigMap.get(eActivityConfigType.XIUXIAN_PVP_ATTACK_DISTANCE.getName()).getIntValue();
        XIUXIAN_PVP_RESURRECTION_CD = activityConfigMap.get(eActivityConfigType.XIUXIAN_PVP_RESURRECTION_CD.getName()).getValue();
        XIUXIAN_PVP_SIGN_CD = activityConfigMap.get(eActivityConfigType.XIUXIAN_PVP_SIGN_CD.getName()).getIntValue();
        XIUXIAN_PVP_SEIZE_COUNT_TIME = activityConfigMap.get(eActivityConfigType.XIUXIAN_PVP_SEIZE_COUNT_TIME.getName()).getIntValue();
        XIUXIAN_PVP_PERSONAL_SCORE_KILL = activityConfigMap.get(eActivityConfigType.XIUXIAN_PVP_PERSONAL_SCORE_KILL.getName()).getValue();
        XIUXIAN_PVP_PERSONAL_SCORE_SEIZE = activityConfigMap.get(eActivityConfigType.XIUXIAN_PVP_PERSONAL_SCORE_SEIZE.getName()).getValue();
        XIUXIAN_PVP_APPOINTMENT_CD = activityConfigMap.get(eActivityConfigType.XIUXIAN_PVP_APPOINTMENT_CD.getName()).getIntValue();
        XIUXIAN_PVP_NOTICE_NUM = activityConfigMap.get(eActivityConfigType.XIUXIAN_PVP_NOTICE_NUM.getName()).getIntValue();
        XIUXIAN_PVP_NOTICE_SINGLE_TIME_KILL_NUM = activityConfigMap.get(eActivityConfigType.XIUXIAN_PVP_NOTICE_SINGLE_TIME_KILL_NUM.getName()).getValue();
        XIUXIAN_PVP_NOTICE_SINGLE_WHEEL_KILL_NUM = activityConfigMap.get(eActivityConfigType.XIUXIAN_PVP_NOTICE_SINGLE_WHEEL_KILL_NUM.getName()).getValue();
        XIUXIAN_PVP_NOTICE_SINGLE_WHEEL_SEIZE_NUM = activityConfigMap.get(eActivityConfigType.XIUXIAN_PVP_NOTICE_SINGLE_WHEEL_SEIZE_NUM.getName()).getValue();
        XIUXIAN_PVP_NOTICE_PERSONAL_SCORE = activityConfigMap.get(eActivityConfigType.XIUXIAN_PVP_NOTICE_PERSONAL_SCORE.getName()).getValue();
        XIUXIAN_PVP_NOTICE_SINGLE_PERSONAL_SCORE = activityConfigMap.get(eActivityConfigType.XIUXIAN_PVP_NOTICE_SINGLE_PERSONAL_SCORE.getName()).getValue();
        XIUXIAN_PVP_NOTICE_PLACE_LEVEL = activityConfigMap.get(eActivityConfigType.XIUXIAN_PVP_NOTICE_PLACE_LEVEL.getName()).getValue();
        XIUXIAN_PVP_NOTICE_PLACE_LEVEL_TIME = activityConfigMap.get(eActivityConfigType.XIUXIAN_PVP_NOTICE_PLACE_LEVEL_TIME.getName()).getValue();
        XIUXIAN_PVP_NOTICE_APPOINTMENT = activityConfigMap.get(eActivityConfigType.XIUXIAN_PVP_NOTICE_APPOINTMENT.getName()).getValue();
        XIUXIAN_PVP_NOTICE_APPOINTMENT_RECOVERY = activityConfigMap.get(eActivityConfigType.XIUXIAN_PVP_NOTICE_APPOINTMENT_RECOVERY.getName()).getValue();
        XIUXIAN_PVP_NOTICE_SIGN = activityConfigMap.get(eActivityConfigType.XIUXIAN_PVP_NOTICE_SIGN.getName()).getValue();
        XIUXIAN_PVP_NOTICE_PLACE_CHANGED_HANDS = activityConfigMap.get(eActivityConfigType.XIUXIAN_PVP_NOTICE_PLACE_CHANGED_HANDS.getName()).getValue();
        XIUXIAN_PVP_NOTICE_BATTLE_END_TIME = activityConfigMap.get(eActivityConfigType.XIUXIAN_PVP_NOTICE_BATTLE_END_TIME.getName()).getValue();
        XIUXIAN_PVP_NOTICE_BATTLE_END_TIME_SECT_SCORE = activityConfigMap.get(eActivityConfigType.XIUXIAN_PVP_NOTICE_BATTLE_END_TIME_SECT_SCORE.getName()).getValue();
        XIUXIAN_SECT_SCORE_PRM = activityConfigMap.get(eActivityConfigType.XIUXIAN_SECT_SCORE_PRM.getName()).getValue();
        XIUXIAN_SECT_JUDGE_PRM = activityConfigMap.get(eActivityConfigType.XIUXIAN_SECT_JUDGE_PRM.getName()).getIntValue();
        XIUXIAN_BASE_ATTACK_SPEED = activityConfigMap.get(eActivityConfigType.XIUXIAN_BASE_ATTACK_SPEED.getName()).getIntValue();
        XIUXIAN_ATTRIBUTE_VALUE_MAX = activityConfigMap.get(eActivityConfigType.XIUXIAN_ATTRIBUTE_VALUE_MAX.getName()).getValue();
        XIUXIAN_PVP_ROOM_PEOPLE_NUM_MAX = activityConfigMap.get(eActivityConfigType.XIUXIAN_PVP_ROOM_PEOPLE_NUM_MAX.getName()).getIntValue();
        XIUXIAN_PVP_ATTACK_SPEED_RATIO = activityConfigMap.get(eActivityConfigType.XIUXIAN_PVP_ATTACK_SPEED_RATIO.getName()).getIntValue();
        XIUXIAN_SECT_SCORE_DEFAULT = activityConfigMap.get(eActivityConfigType.XIUXIAN_SECT_SCORE_DEFAULT.getName()).getValue();

        XIUXIAN_MAX_SHANBI_SHANGXIAN = activityConfigMap.get(eActivityConfigType.XIUXIAN_MAX_SHANBI_SHANGXIAN.getName()).getIntValue();
        XIUXIAN_HP_CAP_PARM = activityConfigMap.get(eActivityConfigType.XIUXIAN_HP_CAP_PARM.getName()).getIntValue();
        XIUXIAN_QUALITY_REGULAR_NUM = activityConfigMap.get(eActivityConfigType.XIUXIAN_QUALITY_REGULAR_NUM.getName()).getValue();
        List<String> tempStrList = new ArrayList<>();
        List<Integer> tempIntList = new ArrayList<>();
        tempStrList = StringUtils.stringToStringList(XIUXIAN_QUALITY_REGULAR_NUM,"\\|");
        for(String str : tempStrList){
            tempIntList = StringUtils.stringToIntegerList(str,";");
            qualityRegularMap.put((long)tempIntList.get(0),tempIntList.get(1));
        }

        XIUXIAN_FABAO_ID_REGULAR_NUM = activityConfigMap.get(eActivityConfigType.XIUXIAN_FABAO_ID_REGULAR_NUM.getName()).getValue();
        tempStrList = StringUtils.stringToStringList(XIUXIAN_FABAO_ID_REGULAR_NUM,"\\|");
        for(String str : tempStrList){
            tempIntList = StringUtils.stringToIntegerList(str,";");
            fabaoIdRegularMap.put((long)tempIntList.get(0),tempIntList.get(1));
        }
    }

    public ActivityInfo getActivityInfo() {
        return activityInfo;
    }

    public void setActivityInfo(ActivityInfo activityInfo) {
        this.activityInfo = activityInfo;
    }

    public Map<Integer, XiuXianPvpPlaceConfig> getPlaceConfigMap() {
        return placeConfigMap;
    }

    public void setPlaceConfigMap(Map<Integer, XiuXianPvpPlaceConfig> placeConfigMap) {
        this.placeConfigMap = placeConfigMap;
    }

    public int getXIUXIAN_PERSONAL_SCORE_ID() {
        return XIUXIAN_PERSONAL_SCORE_ID;
    }

    public int getXIUXIAN_SECT_SCORE_ID() {
        return XIUXIAN_SECT_SCORE_ID;
    }

    public int getXIUXIAN_PVP_IS_OPEN() {
        return XIUXIAN_PVP_IS_OPEN;
    }

    public String getXIUXIAN_PVP_PREPARE_TIME() {
        return XIUXIAN_PVP_PREPARE_TIME;
    }

    public List<Integer> getPvpPrepareTimeList() {
        return StringUtils.stringToIntegerList(XIUXIAN_PVP_PREPARE_TIME, "\\|");
    }

    public String getXIUXIAN_PVP_BATTLE_TIME_END_CONDITION() {
        return XIUXIAN_PVP_BATTLE_TIME_END_CONDITION;
    }

    public List<Integer> getPvpBattleTimeEndCondition() {
        return StringUtils.stringToIntegerList(XIUXIAN_PVP_BATTLE_TIME_END_CONDITION, "\\|");
    }

    public String getXIUXIAN_PVP_NOTICE_APPOINTMENT() {
        return XIUXIAN_PVP_NOTICE_APPOINTMENT;
    }

    public String getXIUXIAN_PVP_NOTICE_APPOINTMENT_RECOVERY() {
        return XIUXIAN_PVP_NOTICE_APPOINTMENT_RECOVERY;
    }

    public String getXIUXIAN_PVP_NOTICE_SIGN() {
        return XIUXIAN_PVP_NOTICE_SIGN;
    }

    public int getXIUXIAN_PVP_JOIN_CONDITION() {
        return XIUXIAN_PVP_JOIN_CONDITION;
    }

    public String getXIUXIAN_PVP_PROFILE_RADIUS() {
        return XIUXIAN_PVP_PROFILE_RADIUS;
    }

    public int getXIUXIAN_PVP_MOVE_SPEED() {
        return XIUXIAN_PVP_MOVE_SPEED;
    }

    public int getXIUXIAN_PVP_DELIVERY_CD() {
        return XIUXIAN_PVP_DELIVERY_CD;
    }

    public int getXIUXIAN_PVP_APPOINTMENT_CD() {
        return XIUXIAN_PVP_APPOINTMENT_CD;
    }

    public int getXIUXIAN_PVP_ATTACK_DISTANCE() {
        return XIUXIAN_PVP_ATTACK_DISTANCE;
    }

    public int getXIUXIAN_PVP_SEIZE_COUNT_TIME() {
        return XIUXIAN_PVP_SEIZE_COUNT_TIME;
    }

    public String getXIUXIAN_PVP_PERSONAL_SCORE_KILL() {
        return XIUXIAN_PVP_PERSONAL_SCORE_KILL;
    }

    public String getXIUXIAN_PVP_NOTICE_PLACE_CHANGED_HANDS() {
        return XIUXIAN_PVP_NOTICE_PLACE_CHANGED_HANDS;
    }

    public String getXIUXIAN_PVP_NOTICE_BATTLE_END_TIME() {
        return XIUXIAN_PVP_NOTICE_BATTLE_END_TIME;
    }

    public String getXIUXIAN_PVP_NOTICE_BATTLE_END_TIME_SECT_SCORE() {
        return XIUXIAN_PVP_NOTICE_BATTLE_END_TIME_SECT_SCORE;
    }

    public String getXIUXIAN_PVP_PERSONAL_SCORE_SEIZE() {
        return XIUXIAN_PVP_PERSONAL_SCORE_SEIZE;
    }

    public int getXIUXIAN_PVP_NOTICE_NUM() {
        return XIUXIAN_PVP_NOTICE_NUM;
    }

    public String getXIUXIAN_PVP_NOTICE_SINGLE_TIME_KILL_NUM() {
        return XIUXIAN_PVP_NOTICE_SINGLE_TIME_KILL_NUM;
    }

    public String getXIUXIAN_PVP_NOTICE_SINGLE_WHEEL_KILL_NUM() {
        return XIUXIAN_PVP_NOTICE_SINGLE_WHEEL_KILL_NUM;
    }

    public String getXIUXIAN_PVP_NOTICE_SINGLE_WHEEL_SEIZE_NUM() {
        return XIUXIAN_PVP_NOTICE_SINGLE_WHEEL_SEIZE_NUM;
    }

    public String getXIUXIAN_PVP_NOTICE_PERSONAL_SCORE() {
        return XIUXIAN_PVP_NOTICE_PERSONAL_SCORE;
    }

    public String getXIUXIAN_PVP_NOTICE_SINGLE_PERSONAL_SCORE() {
        return XIUXIAN_PVP_NOTICE_SINGLE_PERSONAL_SCORE;
    }

    public String getXIUXIAN_PVP_NOTICE_PLACE_LEVEL() {
        return XIUXIAN_PVP_NOTICE_PLACE_LEVEL;
    }

    public String getXIUXIAN_PVP_NOTICE_PLACE_LEVEL_TIME() {
        return XIUXIAN_PVP_NOTICE_PLACE_LEVEL_TIME;
    }

    public int getXIUXIAN_TRIPOD_EXP_ID() {
        return XIUXIAN_TRIPOD_EXP_ID;
    }

    public int getXIUXIAN_PRACTICE_SCORE_ID() {
        return XIUXIAN_PRACTICE_SCORE_ID;
    }

    public int getXIUXIAN_XIANLI_SCORE_ID() {
        return XIUXIAN_XIANLI_SCORE_ID;
    }

    public int getXIUXIAN_STATE_UPGRADE_FAIL_CD() {
        return XIUXIAN_STATE_UPGRADE_FAIL_CD;
    }

    public int getXIUXIAN_ENERGY_CD() {
        return XIUXIAN_ENERGY_CD;
    }

    public int getXIUXIAN_ENERGY_CD_NUM() {
        return XIUXIAN_ENERGY_CD_NUM;
    }

    public int getXIUXIAN_ENERGY_LIMIT() {
        return XIUXIAN_ENERGY_LIMIT;
    }

    public int getXIUXIAN_ENERGY_INIT() {
        return XIUXIAN_ENERGY_INIT;
    }

    public int getXIUXIAN_ENERGY_RECOVERY_ITEM_ID() {
        return XIUXIAN_ENERGY_RECOVERY_ITEM_ID;
    }

    public String getXIUXIAN_PVP_RESURRECTION_CD() {
        return XIUXIAN_PVP_RESURRECTION_CD;
    }

    public int getXIUXIAN_PVP_SIGN_CD() {
        return XIUXIAN_PVP_SIGN_CD;
    }

    public String getXIUXIAN_SECT_SCORE_PRM() {
        return XIUXIAN_SECT_SCORE_PRM;
    }

    public int getXIUXIAN_SECT_JUDGE_PRM() {
        return XIUXIAN_SECT_JUDGE_PRM;
    }

    public int getXIUXIAN_PVP_ROOM_PEOPLE_NUM_MAX() {
        return XIUXIAN_PVP_ROOM_PEOPLE_NUM_MAX;
    }

    public String getXIUXIAN_SECT_SCORE_DEFAULT() {
        return XIUXIAN_SECT_SCORE_DEFAULT;
    }

    public int getXIUXIAN_PVP_ATTACK_SPEED_RATIO() {
        return XIUXIAN_PVP_ATTACK_SPEED_RATIO;
    }

    public int getXIUXIAN_JIYUANDIAN_ITEM_ID() {
        return XIUXIAN_JIYUANDIAN_ITEM_ID;
    }

    public int getXIUXIAN_XUTIANYUANLING_ITEM_ID() {
        return XIUXIAN_XUTIANYUANLING_ITEM_ID;
    }

    public Map<Integer, XiuXianStateConfig> getStateConfigMap() {
        return stateConfigMap;
    }

    public void setStateConfigMap(Map<Integer, XiuXianStateConfig> stateConfigMap) {
        this.stateConfigMap = stateConfigMap;
    }

    public Map<Integer, XiuXianTripodConfig> getTripodConfigMap() {
        return tripodConfigMap;
    }

    public void setTripodConfigMap(Map<Integer, XiuXianTripodConfig> tripodConfigMap) {
        this.tripodConfigMap = tripodConfigMap;
    }

    public Map<Integer, XiuXianEquipmentConfig> getEquipmentConfigMap() {
        return equipmentConfigMap;
    }

    public void setEquipmentConfigMap(Map<Integer, XiuXianEquipmentConfig> equipmentConfigMap) {
        this.equipmentConfigMap = equipmentConfigMap;
    }

    public Map<Integer, XiuXianEventConfig> getEventConfigMap() {
        return eventConfigMap;
    }

    public void setEventConfigMap(Map<Integer, XiuXianEventConfig> eventConfigMap) {
        this.eventConfigMap = eventConfigMap;
    }

    public Map<Integer, XiuXianNpcConfig> getNpcConfigMap() {
        return npcConfigMap;
    }

    public void setNpcConfigMap(Map<Integer, XiuXianNpcConfig> npcConfigMap) {
        this.npcConfigMap = npcConfigMap;
    }

    public Map<Integer, XiuXianMissionConfig> getMissionConfigMap() {
        return missionConfigMap;
    }

    public void setMissionConfigMap(Map<Integer, XiuXianMissionConfig> missionConfigMap) {
        this.missionConfigMap = missionConfigMap;
    }

    /**
     * pvp活动准备时间
     */
    public long getPvpPrepareTime() {
        return DateHelper.getTodayZeroTimeStamp() + DateHelper.SECOND_MILLIONS * getPvpPrepareTimeList().get(0);
    }

    /**
     * pvp活动开始时间
     */
    public long getPvpStartTime(){
        return getPvpPrepareTime() + DateHelper.SECOND_MILLIONS * getPvpPrepareTimeList().get(1);
    }

    /**
     * pvp活动结束时间
     */
    public long getPvpEndTime() {
        return getPvpStartTime() + DateHelper.SECOND_MILLIONS * getPvpBattleTimeEndCondition().get(0);
    }

    /**
     * 获取默认的灵峰id
     */
    public int getDefaultMount() {
        for (XiuXianPeakConfig peakConfig : peakConfigMap.values()) {
            if(peakConfig.getRoomNum() == -1) {
                return peakConfig.getId();
            }
        }
        return 0;
    }

    public int getInitStateId() {
        int initStateId = 0;
        for (XiuXianStateConfig stateConfig: stateConfigMap.values()) {
            if (stateConfig.getId() < initStateId || initStateId == 0) {
                initStateId = stateConfig.getId();
            }
        }
        return initStateId;
    }

    public Map<Integer, Map<Integer, XiuXianUpgradeConfig>> getUpgradeConfigMap() {
        return upgradeConfigMap;
    }

    public void setUpgradeConfigMap(Map<Integer, Map<Integer, XiuXianUpgradeConfig>> upgradeConfigMap) {
        this.upgradeConfigMap = upgradeConfigMap;
    }

    public int getXIUXIAN_PLAYER_SKILL_NEED_ANGER() {
        return XIUXIAN_PLAYER_SKILL_NEED_ANGER;
    }

    public void setXIUXIAN_PLAYER_SKILL_NEED_ANGER(int XIUXIAN_PLAYER_SKILL_NEED_ANGER) {
        this.XIUXIAN_PLAYER_SKILL_NEED_ANGER = XIUXIAN_PLAYER_SKILL_NEED_ANGER;
    }

    public String getXIUXIAN_ENERGY_OBTAIN1() {
        return XIUXIAN_ENERGY_OBTAIN1;
    }

    public void setXIUXIAN_ENERGY_OBTAIN1(String XIUXIAN_ENERGY_OBTAIN1) {
        this.XIUXIAN_ENERGY_OBTAIN1 = XIUXIAN_ENERGY_OBTAIN1;
    }

    public int getXIUXIAN_ENERGY_COST() {
        return XIUXIAN_ENERGY_COST;
    }

    public void setXIUXIAN_ENERGY_COST(int XIUXIAN_ENERGY_COST) {
        this.XIUXIAN_ENERGY_COST = XIUXIAN_ENERGY_COST;
    }

    public int getXIUXIAN_EXTRACT_COST() {
        return XIUXIAN_EXTRACT_COST;
    }

    public void setXIUXIAN_EXTRACT_COST(int XIUXIAN_EXTRACT_COST) {
        this.XIUXIAN_EXTRACT_COST = XIUXIAN_EXTRACT_COST;
    }

    public int getXIUXIAN_ATTRIBUTE_VERTIGO_TIME() {
        return XIUXIAN_ATTRIBUTE_VERTIGO_TIME;
    }

    public void setXIUXIAN_ATTRIBUTE_VERTIGO_TIME(int XIUXIAN_ATTRIBUTE_VERTIGO_TIME) {
        this.XIUXIAN_ATTRIBUTE_VERTIGO_TIME = XIUXIAN_ATTRIBUTE_VERTIGO_TIME;
    }

    public Map<Integer, XiuXianPeakConfig> getPeakConfigMap() {
        return peakConfigMap;
    }

    public void setPeakConfigMap(Map<Integer, XiuXianPeakConfig> peakConfigMap) {
        this.peakConfigMap = peakConfigMap;
    }

    public int getXIUXIAN_ENERGY_OBTAIN2() {
        return XIUXIAN_ENERGY_OBTAIN2;
    }

    public void setXIUXIAN_ENERGY_OBTAIN2(int XIUXIAN_ENERGY_OBTAIN2) {
        this.XIUXIAN_ENERGY_OBTAIN2 = XIUXIAN_ENERGY_OBTAIN2;
    }

    public int getXIUXIAN_PEAK_ASSIGN_CD() {
        return XIUXIAN_PEAK_ASSIGN_CD;
    }

    public void setXIUXIAN_PEAK_ASSIGN_CD(int XIUXIAN_PEAK_ASSIGN_CD) {
        this.XIUXIAN_PEAK_ASSIGN_CD = XIUXIAN_PEAK_ASSIGN_CD;
    }

    public int getXIUXIAN_EQUIPMENT_RARE() {
        return XIUXIAN_EQUIPMENT_RARE;
    }

    public void setXIUXIAN_EQUIPMENT_RARE(int XIUXIAN_EQUIPMENT_RARE) {
        this.XIUXIAN_EQUIPMENT_RARE = XIUXIAN_EQUIPMENT_RARE;
    }

    public int getXIUXIAN_BASE_ATTACK_SPEED() {
        return XIUXIAN_BASE_ATTACK_SPEED;
    }

    public void setXIUXIAN_BASE_ATTACK_SPEED(int XIUXIAN_BASE_ATTACK_SPEED) {
        this.XIUXIAN_BASE_ATTACK_SPEED = XIUXIAN_BASE_ATTACK_SPEED;
    }

    public String getXIUXIAN_ATTRIBUTE_VALUE_MAX() {
        return XIUXIAN_ATTRIBUTE_VALUE_MAX;
    }

    public void setXIUXIAN_ATTRIBUTE_VALUE_MAX(String XIUXIAN_ATTRIBUTE_VALUE_MAX) {
        this.XIUXIAN_ATTRIBUTE_VALUE_MAX = XIUXIAN_ATTRIBUTE_VALUE_MAX;
    }

    public String getXIUXIAN_STATE_UPGRADE_FAIL_PRM() {
        return XIUXIAN_STATE_UPGRADE_FAIL_PRM;
    }

    public void setXIUXIAN_STATE_UPGRADE_FAIL_PRM(String XIUXIAN_STATE_UPGRADE_FAIL_PRM) {
        this.XIUXIAN_STATE_UPGRADE_FAIL_PRM = XIUXIAN_STATE_UPGRADE_FAIL_PRM;
    }

    public int getXIUXIAN_STATE_PRODUCTION_XIUWEI_CD() {
        return XIUXIAN_STATE_PRODUCTION_XIUWEI_CD;
    }

    public void setXIUXIAN_STATE_PRODUCTION_XIUWEI_CD(int XIUXIAN_STATE_PRODUCTION_XIUWEI_CD) {
        this.XIUXIAN_STATE_PRODUCTION_XIUWEI_CD = XIUXIAN_STATE_PRODUCTION_XIUWEI_CD;
    }

    public int getXIUXIAN_STATE_UPGRADE_FAIL_CONSUME() {
        return XIUXIAN_STATE_UPGRADE_FAIL_CONSUME;
    }

    public void setXIUXIAN_STATE_UPGRADE_FAIL_CONSUME(int XIUXIAN_STATE_UPGRADE_FAIL_CONSUME) {
        this.XIUXIAN_STATE_UPGRADE_FAIL_CONSUME = XIUXIAN_STATE_UPGRADE_FAIL_CONSUME;
    }

    public int getXIUXIAN_BATTLE_TIME() {
        return XIUXIAN_BATTLE_TIME;
    }

    public void setXIUXIAN_BATTLE_TIME(int XIUXIAN_BATTLE_TIME) {
        this.XIUXIAN_BATTLE_TIME = XIUXIAN_BATTLE_TIME;
    }

    public String getXIUXIAN_PLAYER_ANGER_PRM() {
        return XIUXIAN_PLAYER_ANGER_PRM;
    }

    public void setXIUXIAN_PLAYER_ANGER_PRM(String XIUXIAN_PLAYER_ANGER_PRM) {
        this.XIUXIAN_PLAYER_ANGER_PRM = XIUXIAN_PLAYER_ANGER_PRM;
    }

    public int getXIUXIAN_PLAYER_SKILL_MAX_ANGER() {
        return XIUXIAN_PLAYER_SKILL_MAX_ANGER;
    }

    public void setXIUXIAN_PLAYER_SKILL_MAX_ANGER(int XIUXIAN_PLAYER_SKILL_MAX_ANGER) {
        this.XIUXIAN_PLAYER_SKILL_MAX_ANGER = XIUXIAN_PLAYER_SKILL_MAX_ANGER;
    }

    public int getXIUXIAN_ENERGY_NOTICE_NUM() {
        return XIUXIAN_ENERGY_NOTICE_NUM;
    }

    public void setXIUXIAN_ENERGY_NOTICE_NUM(int XIUXIAN_ENERGY_NOTICE_NUM) {
        this.XIUXIAN_ENERGY_NOTICE_NUM = XIUXIAN_ENERGY_NOTICE_NUM;
    }

    public int getXIUXIAN_PLAYER_SKILL_DAMAGE_PRM() {
        return XIUXIAN_PLAYER_SKILL_DAMAGE_PRM;
    }

    public void setXIUXIAN_PLAYER_SKILL_DAMAGE_PRM(int XIUXIAN_PLAYER_SKILL_DAMAGE_PRM) {
        this.XIUXIAN_PLAYER_SKILL_DAMAGE_PRM = XIUXIAN_PLAYER_SKILL_DAMAGE_PRM;
    }

    public String getXIUXIAN_XIANLI_PRM() {
        return XIUXIAN_XIANLI_PRM;
    }

    public void setXIUXIAN_XIANLI_PRM(String XIUXIAN_XIANLI_PRM) {
        this.XIUXIAN_XIANLI_PRM = XIUXIAN_XIANLI_PRM;
    }

    public String getXIUXIAN_INIT_EQUIPMENT() {
        return XIUXIAN_INIT_EQUIPMENT;
    }

    public void setXIUXIAN_INIT_EQUIPMENT(String XIUXIAN_INIT_EQUIPMENT) {
        this.XIUXIAN_INIT_EQUIPMENT = XIUXIAN_INIT_EQUIPMENT;
    }

    public int getXIUXIAN_PRACTICE_MENU_NUM() {
        return XIUXIAN_PRACTICE_MENU_NUM;
    }

    public void setXIUXIAN_PRACTICE_MENU_NUM(int XIUXIAN_PRACTICE_MENU_NUM) {
        this.XIUXIAN_PRACTICE_MENU_NUM = XIUXIAN_PRACTICE_MENU_NUM;
    }

    public int getXIUXIAN_MAX_SHANBI_SHANGXIAN() {
        return XIUXIAN_MAX_SHANBI_SHANGXIAN;
    }

    public int getXIUXIAN_HP_CAP_PARM() {
        return XIUXIAN_HP_CAP_PARM;
    }

    public Map<Long, Integer> getQualityRegularMap() {
        return qualityRegularMap;
    }

    public Map<Long, Integer> getFabaoIdRegularMap() {
        return fabaoIdRegularMap;
    }
}
